const topEmitter = require('../app/main/topinfo');
topEmitter.start({
    // pid_limit: 10,
    pid_sort: (a,b) => {
        return a.mem - b.mem;
    },
    pid_filter: (proc) => {
        return proc;
    },
});
topEmitter.on('data', data => {
    console.log('data+++++', data);
});
topEmitter.on('error', err => {
    console.log('err++++++++', err);
});
setTimeout(() => {
    topEmitter.stop();
}, 5000);

const os = require('os');
console.log(os.totalmem());